<template>
    <view>
        <!-- 公司我的接单/需求单详情进来的，推荐（调用接口推荐此阿姨给前一页面的业主） -->
        <uni-popup ref="popup_recommend" type="center">
            <view class="recommendBshow_wrap">
                <view class="re_title">推荐成功</view>
                <view class="re_tip">{{ tip }}</view>
                <view class="nova-row-center" style="display: inline-flex; margin-top: 30rpx;">
                    <view class="re_back" v-if="negbtn" @tap="_cancel">{{ negbtn }}</view>
                    <view class="re_back" @tap="_confirm">{{posbtn}}</view>
                </view>
            </view>
        </uni-popup>
<!--        <button @click="open">open</button>
        <button @click="close">close</button> -->
    </view>
</template>

<script>
import uniPopup from '../../components/uni-popup/uni-popup.vue'
export default {
    name: 'c-popup-tip',
    components: {
        uniPopup
    },
    props: {},
    data() {
        return {
            icon: '',
            title: '',
            tip: '',
            posbtn: '确定',
            negbtn: ''
        };
    },
    methods: {
        open(data) {
            if (data && data.countdown) {
                setTimeout(function() {}, data.countdown);
            }
            this.$refs.popup_recommend.open()
        },
        close() {
            this.$refs.popup_recommend.close()
        },
        _confirm() {
            this.close()
            console.log('emit confirm');
            this.$emit('confirm');
        },
        _cancel() {
            this.close()
            this.$emit('cancel');
        }
    }
};
</script>

<style lang="scss">
.recommendBshow_wrap {
    background: #ffffff;
    border-radius: 10rpx;
    text-align: center;
    width: 500rpx;
    padding: 34rpx;
    .re_title {
        font-size: 32rpx;
        font-weight: 400;
        color: rgba(0, 0, 0, 1);
        line-height: 48rpx;
        padding: 30rpx 0;
    }
    .re_tip {
        color: #999999;
        font-size: 24rpx;
    }
    .re_back {
        background: rgba(255, 103, 2, 1);
        border-radius: 12rpx;
        font-size: 26rpx;
        font-weight: 400;
        color: rgba(255, 255, 255, 1);
        height: 60rpx;
        line-height: 60rpx;
        display: inline-block;
        margin-bottom: 50rpx;
        padding: 0 30rpx;
    }
}
</style>
